/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.reg;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * <p>Project: jse2302 - StringBuilder1
 * <p>Powered by webrx On 2023-06-21 09:59:07
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class StringBuilder1 {
    public static void main(String[] args) {
        Pattern p = Pattern.compile("[a-zA-Z]+");
        Matcher m = p.matcher("my23123 name lisi student java     thanks");
        //System.out.println(m.matches());
        while(m.find()){
            System.out.println(m.group());
        }

        System.out.println();
        String str = "my23123 name lisi student java     thanks".replaceAll(p.pattern(),"");
        System.out.println(str);

    }
}
